package vista;

import java.awt.Color;
import java.awt.Graphics;

import javax.swing.JPanel;

public class PanelPista extends JPanel{

		private static final long serialVersionUID = 1L;
		private int y;
		
	
		
		public PanelPista() {
			super();
		}

		public void paintComponent(Graphics g) 
	    {
	        super.paintComponent(g);
	        g.drawRect(170, y, 20, 20);
	        g.setColor(Color.black);
	        
	    }

		public void redibujar(int d) {
			y=d;
			repaint();
			
			
		}

}
